package com.wang.springbootinit.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wang.springbootinit.model.dto.teacher.TeacherAddRequest;
import com.wang.springbootinit.model.dto.teacher.TeacherEditRequest;
import com.wang.springbootinit.model.dto.teacher.TeacherQueryRequest;
import com.wang.springbootinit.model.entity.Teacher;
import com.wang.springbootinit.model.vo.TeacherVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 教师服务
 */
public interface TeacherService extends IService<Teacher> {

    /**
     * 分页获取教师列表
     *
     * @param teacherQueryRequest 查询条件
     * @return 教师分页数据
     */
    Page<TeacherVO> getTeacherVOPage(TeacherQueryRequest teacherQueryRequest);

    /**
     * 添加教师
     *
     * @param teacherAddRequest 教师信息
     * @return 教师id
     */
    long addTeacher(TeacherAddRequest teacherAddRequest);

    /**
     * 更新教师信息
     *
     * @param teacherEditRequest 教师信息
     * @return 是否成功
     */
    boolean updateTeacher(TeacherEditRequest teacherEditRequest);

    /**
     * 获取教师VO
     *
     * @param id 教师id
     * @return 教师信息
     */
    TeacherVO getTeacherVOById(Long id);


//    ==============================教师端=====================================
    /**
     * 更新教师的个人信息
     */
    boolean updateTeacherInfo(TeacherEditRequest updateRequest);

    /**
     * 获取当前登录教师的个人信息
     */
    TeacherVO getCurrentTeacherInfo(HttpServletRequest request);
}
